/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.co.pas.business.data;

import java.io.Serializable;
import java.util.Calendar;
import java.util.List;
import javax.persistence.Entity;
import za.co.pas.business.data.audit.GenericAudit;

/**
 *
 * @author alabuschagne
 */
@Entity
public class UserGroups extends GenericData implements Serializable, Comparable
{

    private static final long serialVersionUID = 1L;

    public UserGroups()
    {
        super();
    }

    public UserGroups(String name)
    {
        super();
        this.name = name;
    }
    
    @Override
    public int hashCode()
    {
        return super.hashCode();
    }

    @Override
    public boolean equals(Object object)
    {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof UserGroups))
        {
            return false;
        }
        UserGroups other = (UserGroups) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)))
        {
            return false;
        }
        return true;
    }

    public boolean check(UserType otherUT)
    {
        if (!super.check(otherUT))
        {
            return false;
        }
        return true;
    }

    @Override
    public UserGroups clone()
    {
        UserGroups ut = new UserGroups();
        ut.setDescription(description);
        ut.setId(id);
        ut.setName(name);
        return ut;
    }

    

    @Override
    public int compareTo(Object o)
    {
        return super.compareTo(o);
    }   
}
